//
//  AboutViewController.m
//  Job
//
//  Created by 桑赐相 on 2018/8/26.
//  Copyright © 2018年 桑赐相. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end
 
@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"关于我们";
    
    UIImageView *imageView = [UIImageView new];
    imageView.image = [UIImage imageNamed:@"logo"];
    imageView.contentMode = UIViewContentModeScaleAspectFit;
    [imageView setLayerWithRadius:10 color:ClearColor width:0.0];
    [self.view addSubview:imageView];
    
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
    NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
    NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
    UILabel *nameLabel = [UILabel new];
    nameLabel.text = app_Name;
    nameLabel.font = Font17;
    nameLabel.textColor = [UIColor darkGrayColor];
    [self.view addSubview:nameLabel];
    
    UILabel *version = [UILabel new];
    version.text = app_Version;
    version.font = Font14;
    version.textColor = [UIColor lightGrayColor];
    [self.view addSubview:version];
    
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.view).offset(100);
        make.centerX.equalTo(self.view);
        make.height.with.mas_offset(60);
        
    }];
    
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(imageView.mas_bottom).offset(20);
        make.centerX.equalTo(self.view);
        
    }];
    
    
    [version mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(nameLabel.mas_bottom).offset(15);
        make.centerX.equalTo(self.view);
        
    }];
    
}


@end
